/*
* Copyright 2011 Stepan Riha
*
* This file may be used under the terms of of the
* GNU General Public License Version 3 or later (the "GPL"),
* http://www.gnu.org/licenses/gpl.html
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*/

$(document).ready(function() {
	$('.tabs a').click(function() {
		var $this = $(this);
		var $tabs = $this.closest('.tabs');

		$('a', $tabs).removeClass('active');		
		$tabs.siblings().removeClass('active');

		$this.addClass('active');
		var id = $this.attr('href').replace(/^[^\#]*/, "");
		$(id).addClass('active');
		return false;
	});
	
	$('.tabs a').first().click();
	
});